﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.ProductListModels>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<div align="center" class="bg_tit_sf"><div class="txt_tit_sf"><%=ViewData["Title"] %></div></div>
<div id="list_sfam">
	<ul>
    	<%foreach (var item in Model.Products)
       { %>
    	<li>
       	    <div class="bg_img">
       	        <a href="/product/details/<%=item.ID %>/<%=Html.ToUrlFriendly(item.Name)%>">
                    <% string imgPath = (item.ImagePath != null && item.ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(item.ID, 187, 187, item.ImagePath, Model.ImagePath, Model.ImageUrl) : SDT.Lib.Common.Globals.DefaultLogo; %>
                    <img src="<%=imgPath %>" title="<%=item.Name %>" alt="<%=item.Name %>" width="187px" height="187px"" />
                 </a>
       	    </div>
            <h3><a href="/product/details/<%=item.ID %>/<%=Html.ToUrlFriendly(item.Name)%>"><%=Html.Encode(item.Name) %></a></h3>
            <div>
                <span class="t_red"><strong><%=string.Format("{0:0,0}",item.UnitPrice) %> ₫</strong></span>
                <a href="/product/details/<%=item.ID %>/<%=Html.ToUrlFriendly(item.Name)%>"><img src="/Images/mq/btn_detail.png" title="<%=item.Name %>" alt="<%=item.Name %>" style="vertical-align:middle" /></a>
            </div>
        </li>
        <%} %>
    </ul>
</div>

